package com.qhong.converter;

import java.nio.charset.Charset;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.StringHttpMessageConverter;

/**
 * Created by qhong on 2018/6/1 10:52
 * https://www.cnblogs.com/hellxz/p/8735602.html
 **/
//@Configuration
public class StringHttpMessageConverterConfig {

	//此方法位于一个有@Configuration注解的类中
	@Bean
	public StringHttpMessageConverter stringHttpMessageConverter(){
		StringHttpMessageConverter converter  = new StringHttpMessageConverter(Charset.forName("UTF-8"));
		return converter;
	}
}
